extern crate serde;
extern crate serde_json;

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug)]
pub struct User{
    pub user_uuid:String,
    pub user_name:String,
    pub nice_name:String,
    pub real_name:String,
    pub sex:i32,
    pub birth_day:String,
    pub phone:String,
    pub avatar_text:String,
    pub token:String,
    pub user_id:String,
    pub email:String,
    pub credit_score:i32,
    pub area:String,
    pub address:String,
    pub is_explicit:i32,//外显昵称 1:nicename 2:realname
    pub copper_cash:i64,//铜钱
    pub gold_ingot:i64,//金元宝
    pub level_score:i64,//评测等级分
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UserAvatar{
    pub id:i32,
    pub avatar_text:String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UserData{
    pub data:Option<User>,
    pub error_code:i32,
    pub error_msg:String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UserKey{
    pub key_string:String,
    pub key_int:i32,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UserKeyData{
    pub data:Option<UserKey>,
    pub error_code:i32,
    pub error_msg:String,
}